package com.settlement.system.controller;

import com.settlement.system.service.IBaseService;
import com.settlement.system.common.util.common.DictionaryUtil;
import com.settlement.system.common.util.common.FasUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
import com.settlement.system.model.entity.common.TblCostWeightOrder;
import jakarta.annotation.Resource;
import com.settlement.system.service.ITblCostWeightOrderService;

import java.util.Map;

/**
 * 【RR-费用分配权数】菜单 的 【订单列表】页签 前端控制器
 * @author xiaochuan
 * @since 2022-12-28
 */

@Api(tags = "【RR-费用分配权数】菜单 的 【订单列表】页签",description = "【RR-费用分配权数】菜单 的 【订单列表】页签")
@RestController
@RequestMapping("/tblCostWeightOrder")
public class TblCostWeightOrderController extends BaseController<TblCostWeightOrder> {

    @Resource
    private ITblCostWeightOrderService tblCostWeightOrderService;

    @Resource
    private DictionaryUtil dictionaryUtil;

    @Override
    public IBaseService init() {
        return tblCostWeightOrderService;
    }

    @Override
    protected void setParamsModel(Map<String, Object> model) {
        String nameShort = dictionaryUtil.getNameShortShowChildBrandName();
        if(StringUtils.isNotEmpty(nameShort)){
            model.put("nameShort",nameShort);
        }
        FasUtil.formatInQueryCondition(model, "channelNo","companyNo","accountingPeriod","shopNo","nameShort");
        super.setParamsModel(model);
    }
}

